﻿using QMERP.SeedWork;

namespace QMERP.Domain.Entities
{
    /// <summary>
    /// 出库单
    /// </summary>
    public partial class LeaveStockOrder : FullEntity<long>
    {
        public LeaveStockOrder() 
        {
            LeaveStockOrderDetails = new HashSet<LeaveStockOrderDetail>();
            EnterStockOrders = new HashSet<EnterStockOrder>();
        }
        /// <summary>
        /// 出库单号
        /// </summary>
        public string Number { get; set; } = "";
        /// <summary>
        /// 业务单Id
        /// </summary>
        public long? BusinessOrderId { get; set; }
        /// <summary>
        /// 业务单编号
        /// </summary>
        public string? BusinessOrderNumber { get; set; }
        /// <summary>
        /// 业务单类型
        /// </summary>
        public string? BusinessOrderType { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        public string BusinessType { get; set; } = "";
        /// <summary>
        /// 出货方式
        /// </summary>
        public string? LeaveStockWay { get; set; }
        /// <summary>
        /// 出库状态
        /// </summary>
        public string Status { get; set; } = "";
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
        /// <summary>
        /// 审核人Id
        /// </summary>
        public long? CheckedBy { get; set; }
        /// <summary>
        /// 审核人名称
        /// </summary>
        public string? CheckedByName { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? CheckedOn { get; set; }

        public long? ShipmentLogId { get; set; }

        public ShipmentLog? ShipmentLog { get; set; }
        /// <summary>
        /// 出库单详情列表
        /// </summary>
        public virtual ICollection<LeaveStockOrderDetail> LeaveStockOrderDetails { get; set; }
        /// <summary>
        /// 入库单列表
        /// </summary>
        public virtual ICollection<EnterStockOrder> EnterStockOrders { get; set; }
    }
}
